package follow.juc.heima.day9;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Author tu zy
 * @Date 2020/11/21 14:58
 * @Version 1.0
 */
public class Demo4ConcurrentHashMap1 {
    public static void main(String[] args) {
        //Map<String, Integer> map = new HashMap<>();
        ConcurrentHashMap<String, Integer> map = new ConcurrentHashMap<>();
        map.put("a", 1);
        map.put("b", 1);
        map.put("c", 1);
        for (Map.Entry<String, Integer> entry : map.entrySet()) {
            map.remove(entry.getKey());
        }


        System.out.println(map.size());
    }
}
